<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<header th:replace="~{admin/header::header-fragment}">
</header>
<style>
    .ui-jqgrid tr.jqgrow td {
        white-space: normal !important;
        height: auto;
        vertical-align: text-top;
        padding-top: 2px;
    }

    a {
        color: #34b66e;
        text-decoration: none;
        background-color: transparent;
        -webkit-text-decoration-skip: objects;
    }

    a:hover {
        color: white;
        background-color: #34b66e;
    }
</style>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
    <!-- 引入页面头header-fragment -->
    <div th:replace="~{admin/header::header-nav}"></div>
    <!-- 引入工具栏sidebar-fragment -->
    <div th:replace="~{admin/sidebar::sidebar-fragment(${path})}"></div>
    <!-- Content Wrapper. Contains 图标content -->
    <div class="content-wrapper">
        <!-- Content Header (图标header) -->
        <div class="content-header">
            <div class="container-fluid">
            </div><!-- /.container-fluid -->
        </div>
        <!-- Main content -->
        <div class="content">
            <div class="container-fluid">
                <div class="card card-primary card-outline">
                    <div class="card-header">
                        <h3 class="card-title">商品管理</h3>
                    </div> <!-- /.card-body -->
                    <div class="card-body">
                        <div class="grid-btn">
                            <button class="btn btn-info" onclick="addGoods()"><i
                                    class="fa fa-plus"></i>&nbsp;添加商品
                            </button>
                            <button class="btn btn-info" onclick="editGoods()"><i
                                    class="fa fa-pencil-square-o"></i>&nbsp;修改商品
                            </button>
                            <button class="btn btn-success" onclick="putUpGoods()"><i
                                    class="fa fa-arrow-up"></i>&nbsp;上架商品
                            </button>
                            <button class="btn btn-danger" onclick="putDownGoods()"><i
                                    class="fa fa-arrow-down"></i>&nbsp;下架商品
                            </button>
                        </div>
                        <div class="grid-btn">
                            <select style="width: 112px;" class="form-control select2" id="goodsStatusSelect"
                                    data-placeholder="请选择销售状态...">
                                <option value="100">
                                    全部商品
                                </option>
                                <option value="0">
                                    销售中
                                </option>
                                <option value="1">
                                    已下架
                                </option>
                            </select>&nbsp;
                            <input style="width: 140px;" type="text" placeholder="商品名称" id="goodsNameInput"
                                   class="form-control">&nbsp;&nbsp;
                            <button class="btn btn-info" onclick="searchGoods()"><i class="fa fa-search"></i>&nbsp;搜索
                            </button>
                        </div>
                        <table id="jqGrid" class="table table-bordered">
                        </table>
                        <div id="jqGridPager"></div>
                    </div><!-- /.card-body -->
                </div>
            </div><!-- /.container-fluid -->
        </div>
    </div>
    <!-- /.content-wrapper -->
    <!-- 引入页脚footer-fragment -->
    <div th:replace="~{admin/footer::footer-fragment}"></div>
</div>
<!-- jQuery -->
<script th:src="@{/admin/plugins/jquery/jquery.min.js}"></script>
<!-- Bootstrap 4 -->
<script th:src="@{/admin/plugins/bootstrap/js/bootstrap.bundle.min.js}"></script>
<!-- AdminLTE App -->
<script th:src="@{/admin/dist/js/adminlte.min.js}"></script>
<!-- jqgrid -->
<script th:src="@{/admin/plugins/jqgrid/jquery.jqGrid.min.js}"></script>
<script th:src="@{/admin/plugins/jqgrid/grid.locale-cn.js}"></script>
<!-- sweetalert -->
<script th:src="@{/admin/plugins/sweetalert/sweetalert.min.js}"></script>
<script th:src="@{/admin/dist/js/public.js}"></script>
<script th:src="@{/admin/dist/js/tea_shop_goods.js}"></script>
</body>
</html>
